package com.chan.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.chan.mapper.CdDetailegatherMapper;
import com.chan.domain.CdDetailegather;
import com.chan.service.ICdDetailegatherService;
import com.chan.common.core.text.Convert;
import com.chan.common.utils.DateUtils;
/**
 * 信息收集Service业务层处理
 *
 * @author chan
 * @date 2024-04-29
 */
@Service
public class CdDetailegatherServiceImpl implements ICdDetailegatherService
{
    @Autowired
    private CdDetailegatherMapper cdDetailegatherMapper;

    /**
     * 查询信息收集
     *
     * @param id 信息收集主键
     * @return 信息收集
     */
    @Override
    public CdDetailegather selectCdDetailegatherById(Long id)
    {
        return cdDetailegatherMapper.selectCdDetailegatherById(id);
    }

    /**
     * 查询信息收集列表
     *
     * @param cdDetailegather 信息收集
     * @return 信息收集
     */
    @Override
    public List<CdDetailegather> selectCdDetailegatherList(CdDetailegather cdDetailegather)
    {
        return cdDetailegatherMapper.selectCdDetailegatherList(cdDetailegather);
    }

    /**
     * 新增信息收集
     *
     * @param cdDetailegather 信息收集
     * @return 结果
     */
    @Override
    public int insertCdDetailegather(CdDetailegather cdDetailegather)
    {
        cdDetailegather.setCreateTime(DateUtils.getNowDate());
        return cdDetailegatherMapper.insertCdDetailegather(cdDetailegather);
    }

    /**
     * 修改信息收集
     *
     * @param cdDetailegather 信息收集
     * @return 结果
     */
    @Override
    public int updateCdDetailegather(CdDetailegather cdDetailegather)
    {
        cdDetailegather.setUpdateTime(DateUtils.getNowDate());
        return cdDetailegatherMapper.updateCdDetailegather(cdDetailegather);
    }

    /**
     * 批量删除信息收集
     *
     * @param ids 需要删除的信息收集主键
     * @return 结果
     */
    @Override
    public int deleteCdDetailegatherByIds(String ids)
    {
        return cdDetailegatherMapper.deleteCdDetailegatherByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除信息收集信息
     *
     * @param id 信息收集主键
     * @return 结果
     */
    @Override
    public int deleteCdDetailegatherById(Long id)
    {
        return cdDetailegatherMapper.deleteCdDetailegatherById(id);
    }
}
